import mysql from "../../db/index.js"

export const getAllTeacher = async (req, res) => {
    try {
        let [data] = await mysql.query('select * from sys_teacher')
        res.send({
            status: 0,
            msg: '数据请求成功',
            data
        })
    } catch (e) {
        res.send({
            status: 1,
            msg: '数据请求失败',
            data: e
        })
    }
}